import mybatis.SqlSessionFactoryUtil;
import mybatis.dao.EmpMapper;
import mybatis.entity.Emp;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

/**
 * @author zhang peng yang ming
 * @create 2018-07-22 17:29
 */
public class EmpTest {
    @Test
    public void findAll() {
        SqlSession session = SqlSessionFactoryUtil.openSession();
//        List<Emp> emps = session.selectList("mybatis.dao.EmpMapper.findAll");
        EmpMapper dao = session.getMapper(EmpMapper.class);
        List<Emp> emps = dao.findAll();
        System.out.println(emps.size());
        session.close();
    }
}
